/*
/product/getProductClasssify
*/


/**
 * 数据库信息
 *
 * @author njc
 * @date 2020/8/26 00:17
 */
import { axios } from '@/utils/request'

/**
 * 产品树
 *
 * @author yubaoshan
 * @date 2020/8/26 00:17
 */
export function getProduct(parameter) {
  return axios({
    url: '/product/productType/treeList',
    method: 'get',
    params: parameter
  })
}

/**
 * 根据产品id查产品详情
 *
 * @author yubaoshan
 * @date 2020/8/26 00:17
 */
export function getItemDetailById(params) {
  return axios({
    url: `/product/getProductList`,
    method: 'get',
    params: params
  })
}

/**
 * 新增产品
 *
 * @author yubaoshan
 * @date 2020/8/26 00:17
 */

export function addProductType(data) {
  return axios({
    url: '/product/productType/add',
    method: 'POST',
    data: data
  })
}
//
export function getProductList(params){
  return axios({
    url:'/product/productList',
    method:'get',
    params:params
  })
}
export function editProductType(data) {
  return axios({
    url: '/product/productType/edit',
    method: 'POST',
    data: data
  })
}

export function removeProdutType(data) {
  return axios({
    url: '/product/productType/remove',
    method: 'post',
    data: data
  })
} export function removeProdut(data) {
  return axios({
    url: '/product/remove',
    method: 'post',
    data: data
  })
}
export function editProdut(data) {
  return axios({
    url: '/product/edit',
    method: 'post',
    data: data
  })
}
export function addProduct(data) {
  return axios({
    url: '/product/add',
    method: 'post',
    data: data
  })
}
